package thread;

//匿名内部类跑起来
public class ThreadDemo3 {
    public static void main(String[] args) {
        Thread thread=new Thread();
        Thread th0 = new Thread() {
            @Override
            public void run() {
                for (int i = 0; i < 1000; i++) {
                    System.out.println("000000000");
                }

            }
        };
        Thread th = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 1; i < 1000; i++) {
                    System.out.println("匿名内部类");
                }
            }
        });
        Thread th2 = new Thread(() -> {
            for (int i = 1; i < 1000; i++)
                System.out.println("lambda");
        });
        th0.start();
        th.start();
        th2.start();
        Runnable a=new Runnable() {
            @Override
            public void run() {

            }
        };
      //  Thread t=new thread
    }
}
